package com.cjc.express.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * ========================
 * Created with intellij IDEA
 * 创建者：杜一平
 * 日期：2017/1/22（星期一）
 * 时间：08：00
 * 说明：封装报价表
 * ==========================
 */
public class Price implements Serializable {
    // 报价表记录id，具有唯一性
    private String priceid;

    // 报价表中快递公司id，字段唯一
    private String companyid;

    // 报价表中快递公司名字，字段唯一
    private String companyname;

    // 发件地，默认为厦门，且不可更改
    private String priceorigin;

    // 收件地
    private String pricedest;

    // 寄快递1kg价格
    private BigDecimal priceinitweight;

    // 寄快递超出1kg，每kg价格
    private BigDecimal priceoverweight;

    // 报价表记录创建时间
    private Date pricecreatetime;

    // 报价表记录修改时间
    private Date priceupdatetime;

    public Price() {
    }

    public Price(String priceid, String companyname, String pricedest, BigDecimal priceinitweight, BigDecimal priceoverweight) {
        this.priceid = priceid;
        this.companyname = companyname;
        this.pricedest = pricedest;
        this.priceinitweight = priceinitweight;
        this.priceoverweight = priceoverweight;
    }
    public Price( String companyname, String pricedest, BigDecimal priceinitweight, BigDecimal priceoverweight) {
        this.companyname = companyname;
        this.pricedest = pricedest;
        this.priceinitweight = priceinitweight;
        this.priceoverweight = priceoverweight;
    }


    ///
    public Price addCompanyname(String companyname) {
        this.companyname = companyname;
        return this;
    }

    public Price addCompanyid(String companyid) {
        this.companyid = companyid;
        return this;
    }


    // getter与setter方法
    public String getPriceid() {
        return priceid;
    }

    public void setPriceid(String priceid) {
        this.priceid = priceid;
    }

    public String getCompanyid() {
        return companyid;
    }

    public void setCompanyid(String companyid) {
        this.companyid = companyid;
    }

    public String getCompanyname() {
        return companyname;
    }

    public void setCompanyname(String companyname) {
        this.companyname = companyname;
    }

    public String getPriceorigin() {
        return priceorigin;
    }

    public void setPriceorigin(String priceorigin) {
        this.priceorigin = priceorigin;
    }

    public String getPricedest() {
        return pricedest;
    }

    public void setPricedest(String pricedest) {
        this.pricedest = pricedest;
    }

    public BigDecimal getPriceinitweight() {
        return priceinitweight;
    }

    public void setPriceinitweight(BigDecimal priceinitweight) {
        this.priceinitweight = priceinitweight;
    }

    public BigDecimal getPriceoverweight() {
        return priceoverweight;
    }

    public void setPriceoverweight(BigDecimal priceoverweight) {
        this.priceoverweight = priceoverweight;
    }

    public Date getPricecreatetime() {
        return pricecreatetime;
    }

    public void setPricecreatetime(Date pricecreatetime) {
        this.pricecreatetime = pricecreatetime;
    }

    public Date getPriceupdatetime() {
        return priceupdatetime;
    }

    public void setPriceupdatetime(Date priceupdatetime) {
        this.priceupdatetime = priceupdatetime;
    }

    @Override
    public String toString() {
        return "Price{" +
                "priceid='" + priceid + '\'' +
                ", companyid='" + companyid + '\'' +
                ", companyname='" + companyname + '\'' +
                ", priceorigin='" + priceorigin + '\'' +
                ", pricedest='" + pricedest + '\'' +
                ", priceinitweight=" + priceinitweight +
                ", priceoverweight=" + priceoverweight +
                ", pricecreatetime=" + pricecreatetime +
                ", priceupdatetime=" + priceupdatetime +
                '}';
    }

}